home *** CD-ROM | disk | FTP | other *** search
- #ifndef SOUNDPLAY_H
- #define SOUNDPLAY_H
-
- #include "Rules.h"
-
- #ifndef THINK_C
- #include <Types.h>
- #endif
-
- // These procedures try to play the sound associated with a move or event.
-
- void SndPlayMove (BoardPtr board, FieldsPtr move, short direction);
- void SndPlayFlicheMove (BoardPtr board, FieldsPtr move, short direction);
- void SndPlayBallDown (void);
- void SndPlayBeep (void);
-
- // Sound channels should preferably be disposed immediately after playing,
- // but since I try to use asynchronous sound, this is difficult:
- // disposing immediately after playing either stops the sound halfway,
- // or makes you wait until the sound has stopped playing.
- // therefore, I leave the channel open, which is allowed,
- // but on the condition you dispose it when another sound is going to play,
- // for example before calling SysBeep or before being deactivated,
- // since the application activated may use sound as well.
- // This procedure disposes the channel, if still open.
-
- void SndDisposeChannels (void);
-
- #endif
-
- #ifdef SOUNDPLAY_C
-
- #include "Error.h"
- #include "Global.h"
- #include "Settings.h"
-
- #ifndef THINK_C
- #include <Memory.h>
- #include <Packages.h>
- #include <Resources.h>
- #endif
- #include <Sound.h>
-
- Boolean PlayResource (SndChannelPtr *channel, short resID);
- void DisposeSoundChannel (SndChannelPtr *channel);
- SndChannelPtr CreateSoundChannel (void);
-
- #endif
-